<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>资料修改</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">

		<link rel="stylesheet" href="css/mui.min.css">
		<link rel="stylesheet" href="css/mui.picker.css">
		<link href="css/mui.poppicker.css" rel="stylesheet" />
		<style>
			html,
			body {
				background-color: #efeff4;
			}
			.mui-views,
			.mui-view,
			.mui-pages,
			.mui-page,
			.mui-page-content {
				position: absolute;
				left: 0;
				right: 0;
				top: 0;
				bottom: 0;
				width: 100%;
				height: 100%;
				background-color: #efeff4;
			}
			.mui-pages {
				top: 46px;
				height: auto;
			}
			.mui-scroll-wrapper,
			.mui-scroll {
				background-color: #efeff4;
			}
			.mui-page.mui-transitioning {
				-webkit-transition: -webkit-transform 300ms ease;
				transition: transform 300ms ease;
			}
			.mui-page-left {
				-webkit-transform: translate3d(0, 0, 0);
				transform: translate3d(0, 0, 0);
			}
			.mui-ios .mui-page-left {
				-webkit-transform: translate3d(-20%, 0, 0);
				transform: translate3d(-20%, 0, 0);
			}
			.mui-navbar {
				position: fixed;
				right: 0;
				left: 0;
				z-index: 10;
				height: 44px;
				background-color: #f7f7f8;
			}
			.mui-navbar .mui-bar {
				position: absolute;
				background: transparent;
				text-align: center;
			}
			.mui-android .mui-navbar-inner.mui-navbar-left {
				opacity: 0;
			}
			.mui-ios .mui-navbar-left .mui-left,
			.mui-ios .mui-navbar-left .mui-center,
			.mui-ios .mui-navbar-left .mui-right {
				opacity: 0;
			}
			.mui-navbar .mui-btn-nav {
				-webkit-transition: none;
				transition: none;
				-webkit-transition-duration: .0s;
				transition-duration: .0s;
			}
			.mui-navbar .mui-bar .mui-title {
				display: inline-block;
				width: auto;
			}
			.mui-page-shadow {
				position: absolute;
				right: 100%;
				top: 0;
				width: 16px;
				height: 100%;
				z-index: -1;
				content: '';
			}
			.mui-page-shadow {
				background: -webkit-linear-gradient(left, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0) 10%, rgba(0, 0, 0, .01) 50%, rgba(0, 0, 0, .2) 100%);
				background: linear-gradient(to right, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0) 10%, rgba(0, 0, 0, .01) 50%, rgba(0, 0, 0, .2) 100%);
			}
			.mui-navbar-inner.mui-transitioning,
			.mui-navbar-inner .mui-transitioning {
				-webkit-transition: opacity 300ms ease, -webkit-transform 300ms ease;
				transition: opacity 300ms ease, transform 300ms ease;
			}
			.mui-page {
				display: none;
			}
			.mui-pages .mui-page {
				display: block;
			}
			.mui-page .mui-table-view:first-child {
				margin-top: 15px;
			}
			.mui-page .mui-table-view:last-child {
				margin-bottom: 0.5rem;
			}
			.mui-table-view {
				margin-top: 0.5rem;
			}
			
			.mui-table-view span.mui-pull-right {
				color: #999;
			}
			.mui-table-view-divider {
				background-color: #efeff4;
				font-size: 14px;
			}
			.mui-table-view-divider:before,
			.mui-table-view-divider:after {
				height: 0;
			}
			.head {
				height: 40px;
			}
			#head {
				line-height: 40px;
				color: #525252;
			}
			.head-img {
				width: 40px;
				height: 40px;
			}
			#head-img1 {
				position: absolute;
				bottom: 10px;
				right: 40px;
				width: 40px;
				height: 40px;
			}
			.update {
				font-style: normal;
				color: #999999;
				margin-right: -25px;
				font-size: 15px
			}
			.mui-fullscreen {
				position: fixed;
				z-index: 20;
				background-color: #000;
			}
			.mui-ios .mui-navbar .mui-bar .mui-title {
				position: static;
			}
			/*问题反馈在setting页面单独的css*/
			#feedback .mui-popover{
				position: fixed;
			}
			#feedback .mui-table-view:last-child {
			    margin-bottom: 0px;
			}
			#feedback .mui-table-view:first-child {
			    margin-top: 0px;
			}
			/*问题反馈在setting页面单独的css==end*/
			.preservation{
				display: block;
			    position: fixed;
			    top: 0;
			    right: 0rem;
			    width: 4rem;
			    height: 3rem;
			    z-index: 9;
			    border: 0;
			    color: #fff;
    			font-size: 1rem;
			    background: #3EBDF5;
			}
			.mui-navbar .mui-bar,.mui-pull-left_style{
			    background: #3EBDF5;
			    height: 3rem;
			}
			.mui-title_fff{
				color: #fff;
				height: 3rem;
    			line-height: 3rem;
    			font-size: 1rem;
			}
			.mui-bar .mui-btn-link {
			    color: #fff;
			}
			.mui-icon-left-nav>img{
				padding: 6px 12px;
			    width: 2.9rem;
			    margin-top: 0.3rem;
			}
			#head-img{
				border-radius: 100%;
				float: right;
			}
			.mui-media-body{
				height: 2.63rem;
    			line-height: 2.9rem;
    			font-size: 0.8rem;
				float: left;
				color: #525252;
			}
			.mui-wh_zidingyi_jiantou:after{
			    right: 3.2rem;
			}
			.mui-table-view-chevron .mui-table-view-cell>a:not(.mui-btn) {
			    margin-right: -6.5rem;
			}
			.mui-page .mui-table-view:first-child {
			    margin-top: 0;
			}
			.mui-table-view-cell:after {
			    background-color: #ebebeb;
			}
			.modify_input{
				width: 95%;
			    margin: 0 auto;
			    background: #efeff4;
			}
			.modify_input>li{
				border-radius: 0.4rem;
			    background: #fbfbfb;
			    padding: 0;
    			margin-top: 1rem;
			}
			.modify_input>li>input{
				border-radius: 0.4rem;
    			margin-bottom: 0px;
    			color: #c2c2c2;
    			font-size: 0.8rem;
			}
			.modify_input:after,.modify_input:before{
			    height: 0px;
			}
			.right_name_head-img1{
				width: 2.63rem;
    			position: relative;
			}
			#head-img1{
				border-radius: 100%;
				right: 0;
    			top: 0;
			}
			.mui-pull-right_name{
				width: 50%;
			    position: relative;
			    overflow: hidden;
			    text-align: right;
				height: 2.63rem;
    			line-height: 2.9rem;
    			font-size: 0.8rem;
    			float: right;
    			margin-right: 10px;
    			color: #a4a4a4;
			}
			.modify_username{
				width: 90% !important;
			    border: 0 !important;
			    text-align: right !important;
			    margin-bottom: 0 !important;
			    font-size: 1rem !important;
    			color: #a4a4a4;
			}
			.mui-pull-right_10{
				margin-right: 0.25rem;
			}
			.mui-btn-blue, .mui-btn-primary, input[type=submit] {
			    border: 1px solid #3EBDF5;
			    background-color: #3EBDF5;
			}
			.mui-wh_zidingyi_jiantou{
				font-size: 0.8rem;
			}
			.right_name_head-img1>img{
				border-radius: 100%;
			    right: 0;
			    top: 0;
			    position: absolute;
    			bottom: 10px;
        		width: 40px;
    			height: 40px;
			}
		</style>
		<link rel="stylesheet" type="text/css" href="css/feedback.css" />
	</head>

	<body class="mui-fullscreen">
		<!--页面主结构开始-->
		<div id="app" class="mui-views">
			<div class="mui-view">
				<div class="mui-navbar">
				</div>
				<div class="mui-pages">
				</div>
			</div>
		</div>
		<!--页面主结构结束-->
		<!--单页面开始-->
		<div id="setting" class="mui-page">
			<!--页面标题栏开始-->
			<div class="mui-navbar-inner mui-bar mui-bar-nav">
				<button type="button" class="mui-left mui-action-back mui-btn  mui-btn-link mui-btn-nav mui-pull-left mui-pull-left_style">
					<span class="mui-icon mui-icon-left-nav"></span>
				</button>
				<h1 class="mui-center mui-title mui-title_fff">资料修改</h1>
				<button class="preservation" id="Total_preservation">保存</button>
			</div>
			<!--页面标题栏结束-->
			<!--页面主内容区开始-->
			<div class="mui-page-content">
				<div class="mui-scroll-wrapper">
					<div class="mui-scroll">
						<ul class="mui-table-view mui-table-view-chevron">
							<li class="mui-table-view-cell mui-media">
								<a id="head" class="mui-navigate-right mui-wh_zidingyi_jiantou">头像
									<div class="mui-pull-right_name right_name_head-img1">
										<img class="head-img mui-action-preview" id="head-img1" src="img/touxiang.png">
									</div>
								</a>
							</li>
							<li class="mui-table-view-cell">
								<a class="mui-navigate-right mui-wh_zidingyi_jiantou" href="#account_username">
									<div class="mui-media-body">
										姓名
									</div>
									<div class="mui-pull-right_name preservationS_username">未填写</div>
								</a>
							</li>
							<li class="mui-table-view-cell">
								<a class="mui-navigate-right mui-wh_zidingyi_jiantou" href="#account_nickname">
									<div class="mui-media-body">
										昵称
									</div>
									<div class="mui-pull-right_name preservationS_nickname">未填写</div>
								</a>
							</li>
							<li class="mui-table-view-cell mui-media">
								<a class="mui-navigate-right mui-wh_zidingyi_jiantou" id="showUserPicker">
									<div class="mui-media-body">
										性别
									</div>
									<div class="mui-pull-right_name" id="userResult">男</div>
								</a>
							</li>
						</ul>
						<ul class="mui-table-view mui-table-view-chevron">
							<li class="mui-table-view-cell">
								<a class="mui-navigate-right mui-wh_zidingyi_jiantou" href="#ls_Firm">
									<div class="mui-media-body">
										律师事务所
									</div>
									<div class="mui-pull-right_name preservationS_Firm">未填写</div>
								</a>
							</li>
							<li class="mui-table-view-cell">
								<a class="mui-navigate-right mui-wh_zidingyi_jiantou" href="#notifications">
									<div class="mui-media-body">
										律师资格证号
									</div>
									<div class="mui-pull-right_name preservationS_certificate">未填写</div>
								</a>
							</li>
							<li class="mui-table-view-cell">
								<a class="mui-navigate-right mui-wh_zidingyi_jiantou" id="showCityPicker3">
									<div class="mui-media-body">
										所在地区
									</div>
									<div class="mui-pull-right_name" id="cityResult3">未填写</div>
								</a>
							</li>
						</ul>
						<ul class="mui-table-view mui-table-view-chevron">
							<li class="mui-table-view-cell">
								<a class="mui-navigate-right mui-wh_zidingyi_jiantou" href="#identity">
									<div class="mui-media-body">
										身份证号
									</div>
									<div class="mui-pull-right_name preservationS_IDnumber">未填写</div>
								</a>
							</li>
							<li class="mui-table-view-cell">
								<a class="mui-navigate-right mui-wh_zidingyi_jiantou" href="#back_bankName">
									<div class="mui-media-body">
										银行名称
									</div>
									<div class="mui-pull-right_name preservationS_bankName">未填写</div>
								</a>
							</li>
							<li class="mui-table-view-cell">
								<a class="mui-navigate-right mui-wh_zidingyi_jiantou" href="#bank">
									<div class="mui-media-body">
										银行卡号
									</div>
									<div class="mui-pull-right_name preservationS_Card">未填写</div>
								</a>
							</li>
							<li class="mui-table-view-cell">
								<a class="mui-navigate-right mui-wh_zidingyi_jiantou" href="#Bank_account">
									<div class="mui-media-body">
										开  户  行
									</div>
									<div class="mui-pull-right_name preservationS_account">未填写</div>
								</a>
							</li>
						</ul>
						<ul class="mui-table-view mui-table-view-chevron">
							<li class="mui-table-view-cell">
								<a class="mui-navigate-right mui-wh_zidingyi_jiantou" href="#in_skill">
									<div class="mui-media-body">
										擅长领域
									</div>
									<div class="mui-pull-right_name preservationS_skill">未填写</div>
								</a>
							</li>
							<li class="mui-table-view-cell">
								<a class="mui-navigate-right mui-wh_zidingyi_jiantou" href="#in_year">
									<div class="mui-media-body">
										执业年限
									</div>
									<div class="mui-pull-right_name preservationS_year">未填写</div>
								</a>
							</li>
							<li class="mui-table-view-cell">
								<a class="mui-navigate-right mui-wh_zidingyi_jiantou" href="#in_introduce">
									<div class="mui-media-body">
										简介
									</div>
									<div class="mui-pull-right_name preservationS_introduce" style="width: 50%;position: relative;overflow: hidden;
    text-align: right;">未填写</div>
								</a>
							</li>
						</ul>
					</div>
				</div>
			</div>
			<!--页面主内容区结束-->
		</div>
		<!--单页面结束-->
		<div id="account_username" class="mui-page">
			<div class="mui-navbar-inner mui-bar mui-bar-nav">
				<button type="button" class="mui-left mui-action-back mui-btn  mui-btn-link mui-btn-nav mui-pull-left mui-pull-left_style">
					<span class="mui-icon mui-icon-left-nav"></span>设置
				</button>
				<h1 class="mui-center mui-title mui-title_fff">姓名</h1>
				<button class="preservation mui-action-back" id="preservationS_username">保存</button>
			</div>
			<div class="mui-page-content">
				<div class="mui-scroll-wrapper">
					<div class="mui-scroll">
						<ul class="mui-table-view modify_input">
							<li class="mui-table-view-cell">
								<input type="text" name="username" placeholder="输入姓名" id="username">
							</li>
						</ul>
					</div>
				</div>
			</div>
		</div>
		<div id="account_nickname" class="mui-page">
			<div class="mui-navbar-inner mui-bar mui-bar-nav">
				<button type="button" class="mui-left mui-action-back mui-btn  mui-btn-link mui-btn-nav mui-pull-left mui-pull-left_style">
					<span class="mui-icon mui-icon-left-nav"></span>设置
				</button>
				<h1 class="mui-center mui-title mui-title_fff">昵称</h1>
				<button class="preservation mui-action-back" id="preservationS_nickname">保存</button>
			</div>
			<div class="mui-page-content">
				<div class="mui-scroll-wrapper">
					<div class="mui-scroll">
						<ul class="mui-table-view modify_input">
							<li class="mui-table-view-cell">
								<input type="text" name="nickname" placeholder="输入昵称" id="nickname">
							</li>
						</ul>
					</div>
				</div>
			</div>
		</div>
		
		<div id="ls_Firm" class="mui-page">
			<div class="mui-navbar-inner mui-bar mui-bar-nav">
				<button type="button" class="mui-left mui-action-back mui-btn  mui-btn-link mui-btn-nav mui-pull-left mui-pull-left_style">
					<span class="mui-icon mui-icon-left-nav"></span>设置
				</button>
				<h1 class="mui-center mui-title mui-title_fff">律师事务所</h1>
				<button class="preservation mui-action-back" id="preservationS_Firm">保存</button>
			</div>
			<div class="mui-page-content">
				<div class="mui-scroll-wrapper">
					<div class="mui-scroll">
						<ul class="mui-table-view modify_input">
							<li class="mui-table-view-cell">
								<input type="text" name="Firm" placeholder="输入律师事务所" id="Firm">
							</li>
						</ul>
					</div>
				</div>
			</div>
		</div>
		
		<div id="notifications" class="mui-page">
			<div class="mui-navbar-inner mui-bar mui-bar-nav">
				<button type="button" class="mui-left mui-action-back mui-btn  mui-btn-link mui-btn-nav mui-pull-left mui-pull-left_style">
					<span class="mui-icon mui-icon-left-nav"></span>设置
				</button>
				<h1 class="mui-center mui-title mui-title_fff">修改律师资格证号</h1>
				<button class="preservation mui-action-back" id="preservationS_certificate">保存</button>
			</div>
			<div class="mui-page-content">
				<div class="mui-scroll-wrapper">
					<div class="mui-scroll">
						<ul class="mui-table-view modify_input">
							<li class="mui-table-view-cell">
								<input type="tel" name="certificate" placeholder="输入律师资格证号" id="certificate">
							</li>
						</ul>
					</div>
				</div>
			</div>
		</div>

		<div id="identity" class="mui-page">
			<div class="mui-navbar-inner mui-bar mui-bar-nav">
				<button type="button" class="mui-left mui-action-back mui-btn  mui-btn-link mui-btn-nav mui-pull-left mui-pull-left_style">
					<span class="mui-icon mui-icon-left-nav"></span>设置
				</button>
				<h1 class="mui-center mui-title mui-title_fff">身份证号</h1>
				<button class="preservation mui-action-back" id="preservationS_IDnumber">保存</button>
			</div>
			<div class="mui-page-content">
				<div class="mui-scroll-wrapper">
					<div class="mui-scroll">
						<ul class="mui-table-view modify_input">
							<li class="mui-table-view-cell">
								<input type="tel" name="IDnumber" placeholder="输入身份证号" id="IDnumber">
							</li>
						</ul>
					</div>
				</div>
			</div>
		</div>
		
		<div id="back_bankName" class="mui-page">
			<div class="mui-navbar-inner mui-bar mui-bar-nav">
				<button type="button" class="mui-left mui-action-back mui-btn  mui-btn-link mui-btn-nav mui-pull-left mui-pull-left_style">
					<span class="mui-icon mui-icon-left-nav"></span>设置
				</button>
				<h1 class="mui-center mui-title mui-title_fff">银行名称</h1>
				<button class="preservation mui-action-back" id="preservationS_bankName">保存</button>
			</div>
			<div class="mui-page-content">
				<div class="mui-scroll-wrapper">
					<div class="mui-scroll">
						<ul class="mui-table-view modify_input">
							<li class="mui-table-view-cell">
								<input type="text" name="bankName" placeholder="输入银行名称" id="bankName">
							</li>
						</ul>
					</div>
				</div>
			</div>
		</div>

		<div id="bank" class="mui-page">
			<div class="mui-navbar-inner mui-bar mui-bar-nav">
				<button type="button" class="mui-left mui-action-back mui-btn  mui-btn-link mui-btn-nav mui-pull-left mui-pull-left_style">
					<span class="mui-icon mui-icon-left-nav"></span>设置
				</button>
				<h1 class="mui-center mui-title mui-title_fff">银行卡号</h1>
				<button class="preservation mui-action-back" id="preservationS_Card">保存</button>
			</div>
			<div class="mui-page-content">
				<div class="mui-scroll-wrapper">
					<div class="mui-scroll">
						<ul class="mui-table-view modify_input">
							<li class="mui-table-view-cell">
								<input type="tel" name="Card" placeholder="输入银行卡号" id="Card">
							</li>
						</ul>
					</div>
				</div>
			</div>
		</div>

		<div id="Bank_account" class="mui-page">
			<div class="mui-navbar-inner mui-bar mui-bar-nav">
				<button type="button" class="mui-left mui-action-back mui-btn  mui-btn-link mui-btn-nav mui-pull-left mui-pull-left_style">
					<span class="mui-icon mui-icon-left-nav"></span>设置
				</button>
				<h1 class="mui-center mui-title mui-title_fff">开户行</h1>
				<button class="preservation mui-action-back" id="preservationS_account">保存</button>
			</div>
			<div class="mui-page-content">
				<div class="mui-scroll-wrapper">
					<div class="mui-scroll">
						<ul class="mui-table-view modify_input">
							<li class="mui-table-view-cell">
								<input type="text" name="account" placeholder="输入开户行" id="account">
							</li>
						</ul>
					</div>
				</div>
			</div>
		</div>

		<div id="in_skill" class="mui-page">
			<div class="mui-navbar-inner mui-bar mui-bar-nav">
				<button type="button" class="mui-left mui-action-back mui-btn  mui-btn-link mui-btn-nav mui-pull-left mui-pull-left_style">
					<span class="mui-icon mui-icon-left-nav"></span>设置
				</button>
				<h1 class="mui-center mui-title mui-title_fff">擅长领域</h1>
				<button class="preservation mui-action-back" id="preservationS_skill">保存</button>
			</div>
			<div class="mui-page-content">
				<div class="mui-scroll-wrapper">
					<div class="mui-scroll">
						<ul class="mui-table-view modify_input">
							<li class="mui-table-view-cell">
								<input type="text" name="skill" placeholder="输入擅长领域" id="skill">
							</li>
						</ul>
					</div>
				</div>
			</div>
		</div>
		
		<div id="in_year" class="mui-page">
			<div class="mui-navbar-inner mui-bar mui-bar-nav">
				<button type="button" class="mui-left mui-action-back mui-btn  mui-btn-link mui-btn-nav mui-pull-left mui-pull-left_style">
					<span class="mui-icon mui-icon-left-nav"></span>设置
				</button>
				<h1 class="mui-center mui-title mui-title_fff">执业年限</h1>
				<button class="preservation mui-action-back" id="preservationS_year">保存</button>
			</div>
			<div class="mui-page-content">
				<div class="mui-scroll-wrapper">
					<div class="mui-scroll">
						<ul class="mui-table-view modify_input">
							<li class="mui-table-view-cell">
								<input type="tel" name="year" placeholder="输入执业年限" id="year">
							</li>
						</ul>
					</div>
				</div>
			</div>
		</div>
		
		<div id="in_introduce" class="mui-page">
			<div class="mui-navbar-inner mui-bar mui-bar-nav">
				<button type="button" class="mui-left mui-action-back mui-btn  mui-btn-link mui-btn-nav mui-pull-left mui-pull-left_style">
					<span class="mui-icon mui-icon-left-nav"></span>设置
				</button>
				<h1 class="mui-center mui-title mui-title_fff">简介</h1>
				<button class="preservation mui-action-back" id="preservationS_introduce">保存</button>
			</div>
			<div class="mui-page-content">
				<div class="mui-scroll-wrapper">
					<div class="mui-scroll">
						<ul class="mui-table-view modify_input">
							<li class="mui-table-view-cell" style="background: inherit;">
								<textarea name="introduce" placeholder="输入简介" id="introduce" style="margin:0;height: 10rem;color: #c2c2c2;"></textarea>
							</li>
						</ul>
					</div>
				</div>
			</div>
		</div>

	</body>
	<script src="js/index.js "></script>
	<script src="js/mui.min.js "></script>
	<script src="js/jquery-1.9.0.js"></script>
	<script src="js/mui.view.js "></script>
	<script src='js/feedback.js'></script>
	<script src="js/mui.picker.js"></script>
	<script src="js/mui.poppicker.js"></script>
	<script src="js/city.data.js" type="text/javascript" charset="utf-8"></script>
	<script src="js/city.data-3.js" type="text/javascript" charset="utf-8"></script>
	<script src="js/js/canvasResize.js" type="text/javascript" charset="utf-8"></script>
	<script src="js/js/binaryajax.js" type="text/javascript" charset="utf-8"></script>
	<script src="js/js/exif.js" type="text/javascript" charset="utf-8"></script>
	<script>
		(function($, doc) {
			$.init();
			$.ready(function() {
				//普通示例
				var userPicker = new $.PopPicker();
				userPicker.setData([{
					text: '男',
				}, {
					text: '女',
				}]);
				var showUserPickerButton = doc.getElementById('showUserPicker');
				var userResult = doc.getElementById('userResult');
				showUserPickerButton.addEventListener('tap', function(event) {
					userPicker.show(function(items) {
						var str = JSON.stringify(items[0].text);
						userResult.innerText = str.replace(/[\ |\~|\`|\!|\@|\#|\$|\%|\^|\&|\*|\(|\)|\-|\_|\+|\=|\||\\|\[|\]|\{|\}|\;|\:|\"|\'|\,|\<|\.|\>|\/|\?]/g,""); 
						//返回 false 可以阻止选择框的关闭
						//return false;
					});
				}, false);
				//-----------------------------------------
				//					//级联示例
				var cityPicker3 = new $.PopPicker({
					layer: 3
				});
				cityPicker3.setData(cityData3);
				var showCityPickerButton = doc.getElementById('showCityPicker3');
				var cityResult3 = doc.getElementById('cityResult3');
				showCityPickerButton.addEventListener('tap', function(event) {
					cityPicker3.show(function(items) {
						cityResult3.innerText = (items[0] || {}).text + " " + (items[1] || {}).text + " " + (items[2] || {}).text;
						//返回 false 可以阻止选择框的关闭
						//return false;
					});
				}, false);
			});
		})(mui, document);
		
		$(function(){
			$(".right_name_head-img1>img").addClass("head-img mui-action-preview");
			$(".right_name_head-img1>img").attr('id','head-img1');
		});

		//初始化单页view
		var viewApi = mui('#app').view({
			defaultPage: '#setting'
		});
		//初始化单页的区域滚动
		mui('.mui-scroll-wrapper').scroll();
		
		setTimeout(function () {
			//defaultImg();
			setTimeout(function() {
				initImgPreview();
			}, 300);
		},500);

		//更换头像
		mui(".mui-table-view-cell").on("tap", "#head", function(e) {
			if(mui.os.plus){
				var a = [{
					title: "拍照"
				}, {
					title: "从手机相册选择"
				}];
				plus.nativeUI.actionSheet({
					title: "修改头像",
					cancel: "取消",
					buttons: a
				}, function(b) {
					switch (b.index) {
						case 0:
							break;
						case 1:
							cameraimages();
							break;
						case 2:
							galleryImgs();
							break;
						default:
							break
					}
				})	
			}
			
		});
		
		var picture = new Array();
		var localurl="";
		var filename;
		function cameraimages() {
			//每次拍摄或选择图片前清空数组对象
			picture.splice(0, picture.length);
			$(".right_name_head-img1")[0].innerHTML = null;
			var cmr = plus.camera.getCamera();
			cmr.captureImage(function(p) {
				plus.io.resolveLocalFileSystemURL(p, function(entry) {
					 localurl = entry.toLocalURL(); //把拍照的目录路径，变成本地url路径，例如file:///........之类的。
					showImg(localurl);
				});
			}, function(e) {
				mui.toast("很抱歉，获取失败 " + e);
			});
		}
		// 全局数组对象，添加文件,用于压缩上传使用
		function galleryImgs() {
			//每次拍摄或选择图片前清空数组对象
			picture.splice(0, picture.length);
			$(".right_name_head-img1")[0].innerHTML = null;
			// 从相册中选择图片
			mui.toast("从相册中选择一张图片");
			plus.gallery.pick(function(path) {
				localurl = path;
				showImg(path);
			}, function(e) {
				mui.toast("取消选择图片");
			}, {
				filter: "image",
				multiple: false
			});
		}

		function showImg(url) {
			// 兼容以“file:”开头的情况
			if (0 != url.toString().indexOf("file://")) {
				url = "file://" + url;
			}
			var _div_ = $(".right_name_head-img1")[0];
			var _img_ = new Image();
			_img_.src = url; // 传过来的图片路径在这里用。
			_img_.onclick = function() {
				plus.runtime.openFile(url);
			};
			_img_.onload = function() {
				var tmph = _img_.height;
				var tmpw = _img_.width;
				var isHengTu = tmpw > tmph;
				var max = Math.max(tmpw, tmph);
				var min = Math.min(tmpw, tmph);
				var bili = min / max;
				if (max > 150) {
					max = 150;
					min = Math.floor(bili * max);
				}
				tmph = isHengTu ? min : max;
				tmpw = isHengTu ? max : min;
				_img_.onload = null;
				plus.io.resolveLocalFileSystemURL(url, function(entry) {
						entry.file(function(file) {
							console.log(file.size + '--' + file.name);
							filename = file.size + '--' + file.name;
							canvasResize(file, {
								width: tmpw,
								height: tmph,
								crop: false,
								quality: 50, //压缩质量
								rotate: 0,
								callback: function(data, width, height) {
									_img_.src = data;
									picture.push(data);
									_div_.appendChild(_img_);
									plus.nativeUI.closeWaiting();
								}
							});
						});
					},
					function(e) {
						plus.nativeUI.closeWaiting();
						console.log(e.message);
					});
			};
		}
		
		function defaultImg() {
			if(mui.os.plus){
				plus.io.resolveLocalFileSystemURL("_doc/head.jpg", function(entry) {
					var s = entry.fullPath + "?version=" + new Date().getTime();;
					document.getElementById("head-img1").src = s;
				}, function(e) {
					document.getElementById("head-img1").src = 'img/touxiang.png';
				})
			}else{
				document.getElementById("head-img1").src = 'img/touxiang.png';
			}
			
		}
		document.getElementById("head-img1").addEventListener('tap', function(e) {
			e.stopPropagation();
		});
		
		function initImgPreview() {
			var imgs = document.querySelectorAll("img.mui-action-preview");
			imgs = mui.slice.call(imgs);
			if (imgs && imgs.length > 0) {
				var slider = document.createElement("div");
				slider.setAttribute("id", "__mui-imageview__");
				slider.classList.add("mui-slider");
				slider.classList.add("mui-fullscreen");
				slider.style.display = "none";
				slider.addEventListener("tap", function() {
					slider.style.display = "none";
				});
				slider.addEventListener("touchmove", function(event) {
					event.preventDefault();
				})
				var slider_group = document.createElement("div");
				slider_group.setAttribute("id", "__mui-imageview__group");
				slider_group.classList.add("mui-slider-group");
				imgs.forEach(function(value, index, array) {
					//给图片添加点击事件，触发预览显示；
					value.addEventListener('tap', function() {
						slider.style.display = "block";
						_slider.refresh();
						_slider.gotoItem(index, 0);
					})
					var item = document.createElement("div");
					item.classList.add("mui-slider-item");
					var a = document.createElement("a");
					var img = document.createElement("img");
					img.setAttribute("src", value.src);
					a.appendChild(img)
					item.appendChild(a);
					slider_group.appendChild(item);
				});
				slider.appendChild(slider_group);
				document.body.appendChild(slider);
				var _slider = mui(slider).slider();
			}
		}
		
		if(mui.os.stream){
			document.getElementById("check_update").display = "none";
		}
		
		//数据保存
		SetStorage("username","preservationS_username");
		SetStorage("nickname","preservationS_nickname");
		SetStorage("certificate","preservationS_certificate");
		SetStorage("IDnumber","preservationS_IDnumber");
		SetStorage("Card","preservationS_Card");
		SetStorage("account","preservationS_account");
		//SetStorage("account_name","preservationS_account_name");
		SetStorage("Firm","preservationS_Firm");
		SetStorage("bankName","preservationS_bankName");
		SetStorage("skill","preservationS_skill");
		//SetStorage("year","preservationS_year");
		SetStorage("introduce","preservationS_introduce");
		var imgPath_append;
		var name = "";
		var img1 = "";
		var username = "";
		var nickname = "";
		var userResult = "";
		var certificate = "";
		var cityResult3 = "";
		var IDnumber = "";
		var Card = "";
		var account = "";
		var preservationS_Firm = "";
		var bankName = "";
		var skill = "";
		var year = "";
		var introduce = "";
		var phoneNum = localStorage.getItem("phoneNum");//获取本地存储手机号
		function SetStorage(id,btnId){
			document.getElementById(btnId).addEventListener("tap",function(){
				document.getElementsByClassName(btnId)[0].innerHTML = document.getElementById(id).value
				img1 = $(".right_name_head-img1>img").attr("src");//头像，这里我需要拿到src
				username = $(".preservationS_username").html();//姓名
				nickname = $(".preservationS_nickname").html();//昵称
				userResult = $("#userResult").html();//性别
				certificate = $(".preservationS_certificate").html();//修改律师资格证号
				cityResult3 = $("#cityResult3").html();//所在地区
				IDnumber = $(".preservationS_IDnumber").html();//身份证号
				Card = $(".preservationS_Card").html();//银行卡号
				account = $(".preservationS_account").html();//开户行
				preservationS_Firm = $(".preservationS_Firm").html();//律师事务所
				bankName = $(".preservationS_bankName").html();//银行名称
				skill = $(".preservationS_skill").html();//擅长领域
				year = $(".preservationS_year").html();//执业年限
				introduce = $(".preservationS_introduce").html();//简介
			});
		}
		
		document.getElementById("preservationS_year").addEventListener("tap",function(){
			var is_year = document.getElementById("year").value;
			if(is_year<=0 || is_year>=100){
				mui.toast("请在执业年限中输入大于0小于100的数！");
				document.getElementsByClassName("preservationS_year")[0].innerHTML = "";
				year = $(".preservationS_year").html();//执业年限
				return false;
			}else{
				document.getElementsByClassName("preservationS_year")[0].innerHTML = document.getElementById("year").value;
				year = $(".preservationS_year").html();//执业年限
			}
		});
		function check(){	
			var str	= document.getElementById("year").value;	
			if(str<=0 || str>=100){
				mui.toast("请在执业年限中输入大于0小于100的数！");
				document.getElementById("year").value = "";
				return false;
			}	
			return true;	
		}
//			console.log($(".right_name_head-img1>img").attr("src"));
		mui(".mui-navbar-inner").on("tap", "#Total_preservation", function() {
			var url = get_url() + 'register/lawyer/update/' + phoneNum;//url地址
			console.log($(".right_name_head-img1>img").attr("src"));
			var data = JSON.stringify(picture);
			console.log(data);
			var temp = new Date();
			var nwaiting = plus.nativeUI.showWaiting();//显示原生等待框
    		webviewShow = plus.webview.create("user.html");//后台创建webview并打开show.html
			$.ajax({
				type: "POST",
				url: url,
				dataType: 'JSONP', //加入这个选项即可
				data: {
					'temp':temp,//为了多次提交加上每个不一样的时间
					'userName': username,//姓名
					'nickName': nickname,//昵称
					'sex': userResult,//性别
					'zyzNum':certificate,//修改律师资格证号
					'area':cityResult3,//所在地区
					'bankName': bankName,//银行名称
					'accountBank': account,//开户行
					'account': IDnumber,//银行卡号
					'idCard':Card,//身份证号
					'ls': preservationS_Firm,//律师事务所
					'skill': skill,//擅长领域
					'introduce': introduce,//简介
					'year': year,//执业年限
					'base64': data,
					'imgName': filename
				},
				jsonp: "jsonpcallback",
				jsonpCallback: "OnGetMemberSuccessByjsonp",
				beforeSend: function(xhr) {},
				success: function(json) {
					if (json == true) {
						mui.toast("已完善");
						localStorage.setItem("imgPath", my_get_url() + json.imgPath);
						nwaiting.close(); //新webview的载入完毕后关闭等待框
				        webviewShow.show("slide-in-right",150); //把新webview窗体显示出来，显示动画效果为速度150毫秒的右侧移入动画
					} else {
						mui.toast("失败");
					}
				},
				error: function(jqXHR, textStatus, errorThrown) {}
			});
		});
		mui.plusReady(function(){
			var url = get_url() + 'register/lawyer/read/' + phoneNum;//url地址
			$.ajax({
				type: "POST",
				url: url,
				dataType: 'JSONP', //加入这个选项即可
				data: {},
				jsonp: "jsonpcallback",
				jsonpCallback: "OnGetMemberSuccessByjsonp",
				beforeSend: function(xhr) {},
				success: function(json) {
					//头像
					$("#head-img1").attr("src",my_get_url() + json.imgPath);
					//名字
					$(".preservationS_username").html(json.USERNAME);
					$("#username").val(json.USERNAME);
					//昵称
					$(".preservationS_nickname").html(json.NICKNAME);
					$("#nickname").val(json.NICKNAME)
					//性别
					$("#userResult").html(json.SEX);
					//修改律师资格证号
					$(".preservationS_certificate").html(json.ZYZNUM);
					$("#certificate").val(json.ZYZNUM);
					//所在地区
					$("#cityResult3").html(json.AREA);
					//银行卡号
					$(".preservationS_Card").html(json.IDCARD);
					$("#account").val(json.IDCARD);
					//开户行
					$(".preservationS_account").html(json.ACCOUNTBANK);
					$("#Card").val(json.ACCOUNTBANK);
					//银行名称
					$(".preservationS_bankName").html(json.BANKNAME);
					$("#bankName").val(json.BANKNAME);
					//身份证号
					$(".preservationS_IDnumber").html(json.ACCOUNT);
					$("#IDnumber").val(json.ACCOUNT);
					//律师事务所
					$(".preservationS_Firm").html(json.LS);
					$("#Firm").val(json.LS);
					//擅长领域
					$(".preservationS_skill").html(json.SKILL);
					$("#skill").val(json.SKILL);
					//执业年限
					$(".preservationS_year").html(json.YEAR);
					$("#year").val(json.YEAR);
					//简介
					$(".preservationS_introduce").html(json.INTRODUCE);
					$("#introduce").val(json.INTRODUCE);
					//localStorage本地存储注销页面使用
					localStorage.setItem("user_touxiang", my_get_url() + json.imgPath);//头像
					localStorage.setItem("nickname", json.NICKNAME);//昵称
					localStorage.setItem("userResult", json.SEX);//性别
					localStorage.setItem("certificate", json.ZYZNUM);//修改律师资格证号
					localStorage.setItem("cityResult3", json.AREA);//所在地区
					localStorage.setItem("IDnumber", json.ACCOUNT);//身份证号
					localStorage.setItem("Card", json.IDCARD);//银行卡号
					localStorage.setItem("account", json.ACCOUNTBANK);//开户行
				},
				error: function(jqXHR, textStatus, errorThrown) {}
			});
		});
		
		var view = viewApi.view;
		(function($) {
			//处理view的后退与webview后退
			var oldBack = $.back;
			$.back = function() {
				if (viewApi.canBack()) { //如果view可以后退，则执行view的后退
					viewApi.back();
				} else { //执行webview后退
					oldBack();
				}
			};
			//监听页面切换事件方案1,通过view元素监听所有页面切换事件，目前提供pageBeforeShow|pageShow|pageBeforeBack|pageBack四种事件(before事件为动画开始前触发)
			//第一个参数为事件名称，第二个参数为事件回调，其中e.detail.page为当前页面的html对象
			view.addEventListener('pageBeforeShow', function(e) {
				//				console.log(e.detail.page.id + ' beforeShow');
			});
			view.addEventListener('pageShow', function(e) {
				//				console.log(e.detail.page.id + ' show');
			});
			view.addEventListener('pageBeforeBack', function(e) {
				//				console.log(e.detail.page.id + ' beforeBack');
			});
			view.addEventListener('pageBack', function(e) {
				//				console.log(e.detail.page.id + ' back');
			});
		})(mui);
		
	</script>

</html>